home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / libsrc / c / io / fcloseal.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-09  |  245 b   |  18 lines

  1. #include <stdio.h>
  2.  
  3. static int count;
  4. static void fcloseall_helper(FILE *f)
  5. {
  6.   if (f >= stdin && f <= stdprn)
  7.     return;
  8.   fclose(f);
  9.   count ++;
  10. }
  11.  
  12. int fcloseall()
  13. {
  14.   count = 0;
  15.   _fwalk(fcloseall_helper);
  16.   return count;
  17. }
  18.